package com.demo2do.fms.admin.entity.export.supplier;

import org.apache.commons.lang3.time.DateFormatUtils;

import com.demo2do.fms.entity.driver.Driver;
import com.demo2do.fms.entity.driver.DriverDuty;

/**
 *
 * @author Ark
 *
 */
public class DriverSheet {

    // ******* 司机状态信息 ******
    
    /** 所属公司 */
    private String organization;
    
    /** 审核状态 */
    private String auditStatus;
    
    /** 是否激活 */
    private String active;
    
    /** 司机管家激活状态 */
    private String appState;
    
    // ******* 司机基本信息 ******
    
    /** 司机姓名 */
    private String name;
    
    /** 工号 */
    private String employeeCode;
    
    /** 身份证号 */
    private String citizenCode;
    
    /** 性别 */
    private String gender;
    
    /** 生日 */
    private String birthday;
    
    /** 手机号码 */
    private String mp;

    /** 职务 */
    private String duty;

    /** 车辆 */
    private String vehicle;

    /** 劳务合同签署方 */
    private String contractParty;
    
    /** 准驾车型 */
    private String drivingType;
    
    /** 驾龄 */
    private Long drivingAge;
    
    // ******* 司机个人信息 ******
    
    /** 文化程度 */
    private String educationLevel;

    /** 政治面貌 */
    private String clan;
    
    /** 专业 */
    private String speciality;

    /** 加入时间 */
    private String joinDate;

    /** 毕业学校 */
    private String school;
    
    /** 学位 */
    private String degree;

    /** 毕业时间 */
    private String graduateDate;

    /** 家庭住址 */
    private String homeAddress;
    
    /** 家庭邮编 */
    private String homeZipcode;

    /** 联系地址 */
    private String contactAddress;

    /** 联系邮编 */
    private String contactZipcode;

    /** 联系人姓名 */
    private String contactorName;

    /** 称谓 */
    private String contactorAppellation;

    /** 固定电话 */
    private String tel;

    /** 备注 */
    private String description;
    
    /**
     * 大通是否黑名单
     */
    private String black;
    
    /**
     * 大通能级评分
     */
    private String score;
    
    /**
     * The default constructor
     */
    public DriverSheet() {
    }
    
    /**
     * 
     * @param driver
     * @param gender
     * @param vehicle
     * @param contractParty
     * @param drivingType
     * @param educationLevel
     * @param clan
     * @param degree
     * @param score 
     * @param black 
     */
	public DriverSheet(Driver driver, String gender, String vehicle, String contractParty, String drivingType,
	        String educationLevel, String clan, String degree, Boolean black, Double score) {
        
        this.organization = driver.getOrganization() != null ? driver.getOrganization().getName() : null;
        this.auditStatus = driver.getStatus() != null ? driver.getStatus().getDescription() : null;
        this.active = driver.getActive() ? "是" : "否";
        this.appState = driver.getAppState() ? "是" : "否";
        
        this.name = driver.getName();
        this.employeeCode = driver.getCode();
        this.citizenCode = driver.getCitizenCode();
        this.gender = gender;
        this.birthday = driver.getBirthday() != null ? DateFormatUtils.format(driver.getBirthday(), "yyyy-MM-dd") : null;
        this.mp = driver.getMp();
        this.duty = DriverDuty.idOf(driver.getDutyId()) != null ? DriverDuty.idOf(driver.getDutyId()).getDescription() : null;
        this.vehicle = vehicle;
        this.contractParty = contractParty;
        this.drivingType = drivingType;
        this.drivingAge = driver.getDrivingAge();
        
        this.educationLevel = educationLevel;
        this.clan = clan;
        this.speciality = driver.getSpeciality();
        this.joinDate = driver.getJoinDate() != null ? DateFormatUtils.format(driver.getJoinDate(), "yyyy-MM-dd") : null;
        this.school = driver.getSchool();
        this.degree = degree;
        this.graduateDate = driver.getGraduateDate() != null ? DateFormatUtils.format(driver.getGraduateDate(), "yyyy-MM-dd") : null;
        this.homeAddress = driver.getHomeAddress();
        this.homeZipcode = driver.getHomeZipcode();
        this.contactAddress = driver.getContactAddress();
        this.contactZipcode = driver.getContactZipcode();
        this.contactorName = driver.getContactorName();
        this.contactorAppellation = driver.getContactorAppellation();
        this.tel = driver.getTel();
        this.description = driver.getDescription();
        this.black = black == null ? "": black ? "是":"否";
        this.score = score != null ? score.toString() : "";
    }
	
    /**
     * @return the organization
     */
    public String getOrganization() {
        return organization;
    }

    /**
     * @return the auditStatus
     */
    public String getAuditStatus() {
        return auditStatus;
    }

    /**
     * @return
     */
    public String getActive() {
		return active;
	}
    
    /**
     * @return
     */
    public String getAppState() {
		return appState;
	}

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @return the employeeCode
     */
    public String getEmployeeCode() {
        return employeeCode;
    }

    /**
     * @return the citizenCode
     */
    public String getCitizenCode() {
        return citizenCode;
    }

    /**
     * @return the gender
     */
    public String getGender() {
        return gender;
    }

    /**
     * @return the birthday
     */
    public String getBirthday() {
        return birthday;
    }

    /**
     * @return the mp
     */
    public String getMp() {
        return mp;
    }

    /**
     * @return the duty
     */
    public String getDuty() {
        return duty;
    }

    /**
     * @return the vehicle
     */
    public String getVehicle() {
        return vehicle;
    }

    /**
     * @return the contractParty
     */
    public String getContractParty() {
        return contractParty;
    }

    /**
     * @return the drivingType
     */
    public String getDrivingType() {
        return drivingType;
    }

    /**
     * @return the drivingAge
     */
    public Long getDrivingAge() {
        return drivingAge;
    }

    /**
     * @return the educationLevel
     */
    public String getEducationLevel() {
        return educationLevel;
    }

    /**
     * @return the clan
     */
    public String getClan() {
        return clan;
    }

    /**
     * @return the speciality
     */
    public String getSpeciality() {
        return speciality;
    }

    /**
     * @return the joinDate
     */
    public String getJoinDate() {
        return joinDate;
    }

    /**
     * @return the school
     */
    public String getSchool() {
        return school;
    }

    /**
     * @return the degree
     */
    public String getDegree() {
        return degree;
    }

    /**
     * @return the graduateDate
     */
    public String getGraduateDate() {
        return graduateDate;
    }

    /**
     * @return the homeAddress
     */
    public String getHomeAddress() {
        return homeAddress;
    }

    /**
     * @return the homeZipcode
     */
    public String getHomeZipcode() {
        return homeZipcode;
    }

    /**
     * @return the contactAddress
     */
    public String getContactAddress() {
        return contactAddress;
    }

    /**
     * @return the contactZipcode
     */
    public String getContactZipcode() {
        return contactZipcode;
    }

    /**
     * @return the contactorName
     */
    public String getContactorName() {
        return contactorName;
    }

    /**
     * @return the contactorAppellation
     */
    public String getContactorAppellation() {
        return contactorAppellation;
    }

    /**
     * @return the tel
     */
    public String getTel() {
        return tel;
    }

    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * @param organization the organization to set
     */
    public void setOrganization(String organization) {
        this.organization = organization;
    }

    /**
     * @param auditStatus the auditStatus to set
     */
    public void setAuditStatus(String auditStatus) {
        this.auditStatus = auditStatus;
    }

    /**
     * @param active
     */
    public void setActive(String active) {
		this.active = active;
	}
    
    /**
     * @param appState
     */
    public void setAppState(String appState) {
		this.appState = appState;
	}

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @param employeeCode the employeeCode to set
     */
    public void setEmployeeCode(String employeeCode) {
        this.employeeCode = employeeCode;
    }

    /**
     * @param citizenCode the citizenCode to set
     */
    public void setCitizenCode(String citizenCode) {
        this.citizenCode = citizenCode;
    }

    /**
     * @param gender the gender to set
     */
    public void setGender(String gender) {
        this.gender = gender;
    }

    /**
     * @param birthday the birthday to set
     */
    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    /**
     * @param mp the mp to set
     */
    public void setMp(String mp) {
        this.mp = mp;
    }

    /**
     * @param duty the duty to set
     */
    public void setDuty(String duty) {
        this.duty = duty;
    }

    /**
     * @param vehicle the vehicle to set
     */
    public void setVehicle(String vehicle) {
        this.vehicle = vehicle;
    }

    /**
     * @param contractParty the contractParty to set
     */
    public void setContractParty(String contractParty) {
        this.contractParty = contractParty;
    }

    /**
     * @param drivingType the drivingType to set
     */
    public void setDrivingType(String drivingType) {
        this.drivingType = drivingType;
    }

    /**
     * @param drivingAge the drivingAge to set
     */
    public void setDrivingAge(Long drivingAge) {
        this.drivingAge = drivingAge;
    }

    /**
     * @param educationLevel the educationLevel to set
     */
    public void setEducationLevel(String educationLevel) {
        this.educationLevel = educationLevel;
    }

    /**
     * @param clan the clan to set
     */
    public void setClan(String clan) {
        this.clan = clan;
    }

    /**
     * @param speciality the speciality to set
     */
    public void setSpeciality(String speciality) {
        this.speciality = speciality;
    }

    /**
     * @param joinDate the joinDate to set
     */
    public void setJoinDate(String joinDate) {
        this.joinDate = joinDate;
    }

    /**
     * @param school the school to set
     */
    public void setSchool(String school) {
        this.school = school;
    }

    /**
     * @param degree the degree to set
     */
    public void setDegree(String degree) {
        this.degree = degree;
    }

    /**
     * @param graduateDate the graduateDate to set
     */
    public void setGraduateDate(String graduateDate) {
        this.graduateDate = graduateDate;
    }

    /**
     * @param homeAddress the homeAddress to set
     */
    public void setHomeAddress(String homeAddress) {
        this.homeAddress = homeAddress;
    }

    /**
     * @param homeZipcode the homeZipcode to set
     */
    public void setHomeZipcode(String homeZipcode) {
        this.homeZipcode = homeZipcode;
    }

    /**
     * @param contactAddress the contactAddress to set
     */
    public void setContactAddress(String contactAddress) {
        this.contactAddress = contactAddress;
    }

    /**
     * @param contactZipcode the contactZipcode to set
     */
    public void setContactZipcode(String contactZipcode) {
        this.contactZipcode = contactZipcode;
    }

    /**
     * @param contactorName the contactorName to set
     */
    public void setContactorName(String contactorName) {
        this.contactorName = contactorName;
    }

    /**
     * @param contactorAppellation the contactorAppellation to set
     */
    public void setContactorAppellation(String contactorAppellation) {
        this.contactorAppellation = contactorAppellation;
    }

    /**
     * @param tel the tel to set
     */
    public void setTel(String tel) {
        this.tel = tel;
    }

    /**
     * @param description the description to set
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * @return the black
     */
    public String getBlack() {
        return black;
    }

    /**
     * @param black the black to set
     */
    public void setBlack(String black) {
        this.black = black;
    }

    /**
     * @return the score
     */
    public String getScore() {
        return score;
    }

    /**
     * @param score the score to set
     */
    public void setScore(String score) {
        this.score = score;
    }

}
